import { createSlice,createAsyncThunk } from "@reduxjs/toolkit";
import instance from "../request/axios";

export const fetchData = createAsyncThunk(
    'fetchData', // 唯一标识符，用于区分多个异步操作

    async () => {
        const reselect = await instance.get('/api/date');
        return reselect.data;
    }

)

const dataSlice = createSlice({
    name: 'data', // 
    initialState: {

    },
    extraReducers: builder => {

    }
})